<template>
  <section id="tinymce-editor">{{value}}</section>
</template>

<script>
    // import './tinymce.min'
    // import './themes/silver/theme.min'
    // import './langs/zh_CN'
    import load from "@/components/tinymce-editor/load";
    export default {
        name: "index",
        props: ['value'],
        mounted() {
          load("./tinymce.min.js", (err) => {
            if (err) {
              this.$message.error(err.message)
              return
            }
            console.log("ddc")
            this.init()
          })

        },
        created(){

        },
        methods:{
          init(){
            tinymce.init({
              selector:"#tinymce-editor",
              language:"zh_CN",
              //菜单栏
              menubar:'bar1 bar2',
              menu:{
                bar1:{title:"菜单栏",items:"copy paste"},
                bar2:{title:"菜单栏",items:"cut"}
              }
            })
          }
        }
    }
</script>

<style scoped>
/*@import url("./skins/ui/oxide/skin.min.css");*/
</style>
